<include file="public@header"/>
</head>
<body>
<div class="wrap js-check-wrap">
    <ul class="nav nav-tabs">
        <li class="active"><a href="{:url('Banner/index')}">轮播图列表</a></li>
        <li><a href="{:url('Banner/add')}">添加新闻</a></li>
    </ul>
    <form method="post" class="js-ajax-form margin-top-20" action="{:url('Banner/order')}">
        <div class="table-actions">
            <button class="btn btn-sm btn-primary js-ajax-submit" type="submit">排序</button>
        </div>
        <table class="table table-hover table-bordered table-list">
            <thead>
            <tr>
                <th width="16">
                    <label>
                        <input type="checkbox" class="js-check-all" data-direction="x" data-checklist="js-check-x">
                    </label>
                </th>
                <th>排序字段</th>
                <th>id</th>
                <th>图像</th>
                <th>跳转链接</th>
                <th>操作</th>
            </tr>
            </thead>
            <tbody>
            <foreach name="list" item="v">
                <tr>
                    <td>
                        <input type="checkbox" class="js-check" data-yid="js-check-y" data-xid="js-check-x" name="ids[]" value="">
                    </td>
                    <td>
                        <input name='list_orders[{$v.id}]' class="input input-order mr5" type='text' size='3' value='{$v.list_order}'>
                    </td>
                    <td>{$v.id}</td>
                    <td><img src="{$v.image}" style="width: 80px;height: 50px"></td>
                    <td>{$v.url}</td>
                    <td>
                        <a class="btn btn-xs btn-primary" href="{:url('Banner/edit',array('id'=>$v['id']))}">{:lang('EDIT')}</a>
                        <a class="btn btn-xs btn-danger js-ajax-delete" href="{:url('Banner/delete',array('id'=>$v['id']))}">
                            {:lang('DELETE')}
                        </a>
                    </td>
                </tr>
            </foreach>
            </tbody>
        </table>
        <div>
            <div class="pagination">{$list->render()}</div>
            <div>共有{$list->total()}条，每页显示{$list->listRows()}条，当前第{$list->currentPage()}页，共{$list->lastPage()}页。</div>
        </div>
    </form>
</div>
<script src="__STATIC__/js/admin.js?v={$_static_version}"></script>
</body>
</html>
